<?php
class Node extends DomArObject {

	/**
	 * @orm has parent Node inverse children
	 */
	public $parent;
	/**
	 * @orm owns many children Node inverse parent isTree
	 */
	public $children;
	
}

$node = new Node();
$node->children->treeQuery()->onlyLevels(2)->includeSelf()->commit()->toArray();
$node->children->treeDataQuery()->onlyLevels(2)->includeSelf()->commit()->toArray();

Node::treeQuery();
Node::treeDataQuery();
?>